package com.lfz.quality_effect.exception;

import com.lfz.quality_effect.utils.ReturnCode;
import lombok.Data;

/**
 * @author codermy
 * @createTime 2020/5/8
 */
@Data

public class MyException extends  RuntimeException {
    /**
     * 状态码
     */
    private Integer code;
    /**
     * 异常信息
     */
    private String  msg;

    public MyException(ReturnCode resultEnum) {
        super(resultEnum.getMsg());
        this.code = resultEnum.getCode();
    }

    public MyException(Integer code, String message) {
        this.code = code;
        this.msg = message;
    }
}
